package com.atguigu.common.exception;

/**
 * @Author 小坏
 * @Date 2021/2/10 14:05
 * @Version 1.0
 * @program: 父工程 gulimall 万物起源之地
 */


public class NoStockException extends RuntimeException {

    private Long skuId;

    public NoStockException(Long skuId) {
        super ("商品id:" + skuId + ";没用足够的库存");
    }

    public NoStockException() {
        super ("商品库存不足");
    }

    public NoStockException(String msg) {
        super (msg);
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }
}
